;requirejs && requirejs.config({
    baseUrl: './',
    paths: {
        'jquery': 'lib/jquery'
    }
});


(function(factory) {
	if(typeof define === 'function' && define.amd) {
		define(['frame/XFrame_Graph', 'frame/CommonShape', 'frame/BaseShape', 'jquery'], factory);
	}else {
		factory(XFrame_Graph, CommonShape, BaseShape, jQuery, window);
	}
}(function(XFrame_Graph, CommonShape, BaseShape, $, global) {
	$(function(){
	    var button, pshape, resizeShape;
	    XFrame_Graph.initCanvas('#testcanvas');
		button = new CommonShape.ButtonShape({
		    posX : 150,
		    posY : 150,
		    text : 'abc',
		    isAlwaysOnTop : true
		});
		button.regist();
		pshape = new CommonShape.processShape({
		    posX : 50,
            posY : 50,
            width : 100,
            height :20,
            pv : 0.5,
            showText : true
		});
		pshape.regist();

		resizeShape = new BaseShape({
			posX : 200,
			posY : 200,
			width : 130,
			height : 130,
			resizable : true,
			dragable: true

		});
		resizeShape.regist();
		
		button.bindEvent('click', function(){pshape.toggleDisplay();});
		
		XFrame_Graph.show();
	});
}));